home *** CD-ROM | disk | FTP | other *** search
/ Small Time Crooks Press Kit / Small Time Crooks Press Kit.iso / pc / Small Time Crooks.dxr / Scripts_16_gPreviousSection Button.ls < prev    next >
Encoding:
Text File  |  2000-04-30  |  1.3 KB  |  56 lines

  1. property ancestor, pIncludeRolloverState
  2. global gPreviousSection
  3.  
  4. on beginSprite me
  5.   if pIncludeRolloverState then
  6.     set numTrans to 3
  7.   else
  8.     set numTrans to 2
  9.   end if
  10.   set togSty to 0
  11.   set ancestor to new(script "Bitmap But 1", the spriteNum of me, numTrans, togSty)
  12. end
  13.  
  14. on MouseUpAction me
  15.   if listp(gPreviousSection) then
  16.     if count(gPreviousSection) then
  17.       set previousSection to getLast(gPreviousSection)
  18.       deleteAt(gPreviousSection, count(gPreviousSection))
  19.     end if
  20.   else
  21.     set previousSection to gPreviousSection
  22.   end if
  23.   go(previousSection)
  24. end
  25.  
  26. on MouseDownAction me
  27.   nothing()
  28. end
  29.  
  30. on MouseEnterAction me
  31.   nothing()
  32. end
  33.  
  34. on MouseLeaveAction me
  35.   nothing()
  36. end
  37.  
  38. on getPropertyDescriptionList me
  39.   set description to [:]
  40.   addProp(description, #pIncludeRolloverState, [#default: 1, #format: #boolean, #comment: "Include Rollover State"])
  41.   return description
  42. end
  43.  
  44. on getBehaviorDescription me
  45.   set endChar to offset("--END OF HEADER", the text of me)
  46.   set endLine to the number of lines in char 1 to endChar of the text of me - 1
  47.   set description to line 1 to endLine of the text of me
  48.   repeat with whichLine = endLine down to 1
  49.     if line whichLine of description = EMPTY then
  50.       delete line whichLine of description
  51.     end if
  52.   end repeat
  53.   delete line 1 of description
  54.   return description
  55. end
  56.